package ru.papergames.web.blines.battle.network.serverpackets;

import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;

/**
 * @author: atroshanin
 * Date: 22.05.2010
 * Time: 19:15:43
 */
public class BattleCreateFailed extends WebServerServerPacket {

    private static Log log = LogFactory.getLog(BattleCreateFailed.class);

    private int requestId;

    @Override
    protected void readImpl() {
        requestId = readD();
        log.info("BattleCreateFailed.readImpl, requestId: " + requestId);
    }

    @Override
    protected void runImpl() {
        log.debug("BattleCreateFailed.runImpl");
        getClient().getConnectionHolder().onBattleCreateFail(requestId);
    }

    @Override
    public String getType() {
        return "[s] BattleCreateFailed[0x04]";
    }
}
